{extend name="iframe" /}
{block name="body"}
<form action="{:request()->url()}" class="layui-form layui-form-pane" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" value="{$data.name|default=''}" autocomplete="off" placeholder="请输入名称" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">控制器</label>
        <div class="layui-input-block">
            <input type="text" name="url" value="{$data.url|default=''}" autocomplete="off" placeholder="user/index/index" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">图标</label>
        <div class="layui-input-block">
            <input type="text" name="icon" value="{$data.icon|default=''}" autocomplete="off" placeholder="fa fa-image" class="layui-input">
            <a href="{:url('admin/index/icon')}" class="layui-btn layui-btn-primary layui-btn-position ajax-icon"><i class="fa fa-plus-circle"></i></a>
        </div>
    </div>
    <div class="layui-form-item" pane>
        <label class="layui-form-label">子账户？</label>
        <div class="layui-input-block">
            <input type="radio" name="is_sub" value="1" title="显示" {if isset($data) and $data.is_sub eq 1}checked="checked"{/if}>
            <input type="radio" name="is_sub" value="0" title="不显示" {if empty($data) or isset($data) and $data.is_sub eq 0}checked="checked"{/if}>
        </div>
    </div>
    <div class="layui-form-item" pane>
        <label class="layui-form-label">菜单显示？</label>
        <div class="layui-input-block">
            <input type="radio" name="type" value="nav" title="是" {if empty($data) or isset($data) and $data.type eq 'nav'}checked="checked"{/if}>
            <input type="radio" name="type" value="auth" title="否" {if isset($data) and $data.type eq 'auth'}checked="checked"{/if}>
        </div>
    </div>
    <div class="layui-form-item" pane>
        <label class="layui-form-label">快捷方式？</label>
        <div class="layui-input-block">
            <input type="radio" name="index" value="1" title="是" {if isset($data) and $data.index eq 1}checked="checked"{/if}>
            <input type="radio" name="index" value="0" title="否" {if empty($data) or isset($data) and $data.index eq 0}checked="checked"{/if}>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="text" name="sort_order" value="{$data.sort_order|default='0'}" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="hidden" name="id" value="{$data.id|default=''}">
            <input type="hidden" name="pid" value="{$data.pid|default=$Request.param.id}">
            <button class="layui-btn" lay-filter="i" lay-submit="">保存</button>
            <button class="layui-btn layui-btn-primary" type="reset">重置</button>
        </div>
    </div>
</form>
{/block}
